        var count = 0;
        var vue=new Vue({
            el:'.view_box',
            data:{
                userID:'',
                searchName:'',
                allMail:[],
                isCollection:1,
            },
            computed:{
                
            },
            created:function (){ 
                this.userID=window.android.getUserId();
            },
            methods:{
                //刷新邮件
                refreshMail:function(jsonArray){
                var json = JSON.stringify(jsonArray, null, 4)
                this.allMail=JSON.parse(json).data;
                //console.log(this.allMail)
                },isopen:function(recvid,is){
                    if(recvid==this.userID)
                    {
                        //判定邮件是否查看过
                        if(is==1)return "file:///android_res/drawable/ic_mail_unwatch.png";
                        else return "file:///android_res/drawable/ic_mail_watch.png";
                    }else{
                        return "file:///android_res/drawable/ic_mail_send.png"
                    }
                    
                },collection:function(isCollection){
                this.isCollection = isCollection;
                },

            }
        });
        window.refreshMail= function(jsonArray){
            vue.refreshMail(jsonArray);
        }
        window.collection= function(jsonArray){
            vue.collection(jsonArray);
        }
        //打开邮件
        window.toMessage = function(eid){
            if(count == 0){
                window.android.toMessage(eid);
                count = 1;
            
                flag=setTimeout(function(){
                    count = 0;
                },300); 
            }
        }